package com.biscuit.page.basicservice.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biscuit.page.basicservice.model.entities.mysql.SysAiChatDialogue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author biscuit
 * @createTime 2024/6/11 10:02
 */
@Mapper
public interface AiChatDialogueMapper extends BaseMapper<SysAiChatDialogue> {

    void insertAndIncrement(@Param("data") SysAiChatDialogue aiChatDialogue);

    List<SysAiChatDialogue> selectListBySessionIdAndMinuteBefore(@Param("sessionId") Long sessionId, @Param("minute") int minute);

    void updateResultById(@Param("id") Long id, @Param("result") String result);
}
